<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="description" content=""/>
    <meta name="keywords" content="济源钢铁工会职工网上练兵系统"/>
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
	<link rel="shortcut icon" href="jygt.ico">
	<title>首页</title>
	<tc_include file="Public:head" />
	<link rel="stylesheet" href="__TMPL__Public/front/css/bootstrap.min.css">
    <link rel="stylesheet" href="__TMPL__Public/front/css/bootstrap-responsive.css" >
    <link rel="stylesheet" href="__TMPL__Public/front/css/mystyle.css" >
    <link rel="stylesheet" href="__TMPL__Public/front/css/camera.css">  
    <script src="__TMPL__Public/front/js/jquery.min.js"></script>
	<!-- <script src="__TMPL__Public/front/js/docs.min.js"></script> -->
	<style>
		.pad-left{
			padding:10px 10px 10px 0;
		}
		.pad-full{
			padding:10px;
		}
		.pad-right{
			padding:10px 0 10px 10px;
		}
		.text-center {
		  text-align: center;
		}
	</style>
</head>
<body class="boxed">
	<div class="body">
		<!-- 通用头部 -->
		<div id="top"><tc_include file="Public:front_nav" /></div>
		<div class="shade-bg">
			<img src="__TMPL__Public/front/img/sha.png" class="slidershadow" alt="">
		</div>
		<div class="container">
			<!-- 轮播图切换 -->
			<div class="camera_wrap pattern_4" id="camera_wrap_4">
			
				<php>
				$home_slides=sp_getslide("portal_index");
				$default_home_slides=null;
				$home_slides=empty($home_slides)?$default_home_slides:$home_slides;
				</php>
				
				<foreach name="home_slides" item="vo">
				<div data-src="{:sp_get_asset_upload_path($vo['slide_pic'])}">
					<div class="camera_caption fadeFromTop">
						<a href="{$vo.slide_url}"><h1>{$vo.slide_name}</h1>
						<span>
						{$vo.slide_des} </span></a>
					</div>
				</div>				
				</foreach>
			</div>
			<script>
				jQuery(function(){
					jQuery('#camera_wrap_4').camera({
						height: 'auto',
						loader: 'bar',
						pagination: false,
						thumbnails: false,
						hover: true,
						opacityOnGrid: false,
						fx: 'random',
						transPeriod: 1500,
						time: 7000,
						overlayer: true,
						imagePath: 'img/'
					});
				});
			</script>
			<div class="shade-bg">
				<img src="__TMPL__Public/front/img/sha.png" class="slidershadowcam" alt="">
			</div>
			<!-- 新闻资讯 -->
			<div class="tab1 top20">
				<div class="row">
					<div class="col-md-8">
						<div class="container-fluid">
							<div class="row" style="border-bottom:1px solid #ddd;">
								<div class="col-md-10 col-sm-10 col-xs-10"><h2 class="tab-h2">新闻中心 <small>News Center</small></h2></div>
								<div class="col-md-2 col-sm-2 col-xs-2"><p class="tab-p"><a href="">更多>></a></p></div>
							</div>
						</div>
						<div class="media">
							<div class="media-left">
								<a href="#"><img src="__TMPL__Public/front/img/info1.png" class="media-object" alt=""></a>
							</div>
							<div class="media-body">
								<h4 class="media-heading" style="color:#AE2628;">"网上练兵" 风靡钢厂</h4>
								<div id="news" class="list-group">
									<php> $lists =
									sp_sql_posts_paged("cid:14,15,16;order:post_date DESC;",6); </php>
									<volist name="lists['posts']" id="vo">
									<a class="list-group-item" href="{:leuu('article/index',array('id'=>$vo['object_id'],'cid'=>$vo['term_id']))}" 
										title="{$vo.post_title}">{$vo.post_title|mb_substr=0,15,utf8}
									<span class="badge">{:date('Y-m-d',strtotime($vo['post_date']))}</span></a>
									</volist>
								</div>
							</div>
						</div>
					</div>
					<div class="col-md-4" style="padding-left:20px; padding-top:20px;">
						<ul class="nav nav-tabs">
							<li class="active"><a href="#troop" data-toggle="tab"><b>练兵通讯</b></a></li>
							<li><a href="#trade" data-toggle="tab"><b>行业热点</b></a></li>
							<li><a href="#notice" data-toggle="tab"><b>通知公告</b></a></li>
						</ul>
						<div class="tab-content" style="padding:10px;">
							<div class="tab-pane fade in active" id="troop">
								<table class="table table-hover">
									<tbody>
										<php> $lists = sp_sql_posts_paged("cid:14;order:post_date DESC;",8); </php>
										<volist name="lists['posts']" id="vo">
										<tr>
											<td><a href="{:leuu('article/index',array('id'=>$vo['object_id'],'cid'=>$vo['term_id']))}" 
												title="{$vo.post_title}">{$vo.post_title|mb_substr=0,15,utf8}</a></td>
											<td class="text-right">{:date('Y-m-d',strtotime($vo['post_date']))}</td>
										</tr>
										</volist>										
									</tbody>
								</table>
								<p class="text-right tab-p"><a href="{:leuu('list/index',array('id'=>$vo['term_id']))}">更多>></a><p>
							</div>
							<div class="tab-pane fade" id="trade">
								<table class="table table-hover">
									<tbody>
										<php> $lists = sp_sql_posts_paged("cid:15;order:post_date DESC;",6); </php>
										<volist name="lists['posts']" id="vo">
										<tr>
											<td><a href="{:leuu('article/index',array('id'=>$vo['object_id'],'cid'=>$vo['term_id']))}" 
												title="{$vo.post_title}">{$vo.post_title|mb_substr=0,15,utf8}</a></td>
											<td class="text-right">{:date('Y-m-d',strtotime($vo['post_date']))}</td>
										</tr>
										</volist>
									</tbody>
								</table>
								<p class="text-right tab-p"><a href="{:leuu('list/index',array('id'=>$vo['term_id']))}">更多>></a><p>
							</div>
							<div class="tab-pane fade" id="notice">
								<table class="table table-hover">
									<tbody>
										<php> $lists = sp_sql_posts_paged("cid:16;order:post_date DESC;",6); </php>
										<volist name="lists['posts']" id="vo">
										<tr>
											<td><a href="{:leuu('article/index',array('id'=>$vo['object_id'],'cid'=>$vo['term_id']))}" 
												title="{$vo.post_title}">{$vo.post_title|mb_substr=0,15,utf8}</a></td>
											<td class="text-right">{:date('Y-m-d',strtotime($vo['post_date']))}</td>
										</tr>
										</volist>
									</tbody>
								</table>
								<p class="text-right tab-p"><a href="{:leuu('list/index',array('id'=>$vo['term_id']))}">更多>></a><p>
							</div>
						</div>
					</div>
				</div>
			</div>
			<!-- 广告条 -->
			<div class="tab2 top20">
				<php>
				$ad_slides=sp_getslide("portal_index_ad2");</php>
				<notempty name="ad_slides">
				<img src="{:sp_get_asset_upload_path($ad_slides[0]['slide_pic'])}" alt="" width="100%">
				<else/>
				<img src="__TMPL__Public/front/img/ad/advert2.jpg" alt="" width="100%">
				</notempty>
			</div>
			<!-- 闯关信息头部 -->
			<div class="top20">
				<div class="titleborder text-center" >
					<h2 class="tab-h2">闯关练兵 <small>Recruit training</small></h2>
				</div>
				<div class="tab3-bg">
					<div class="row">			
						<div class="col-md-3 col-sm-6">
							<div class="grey-box-icon">
								<div class="icon-box-top">
									<a href="{:U('paper/paper_list')}"><img src="__TMPL__Public/front/img/tab1-1.png" alt="" class="fontawesome-icon medium circle-white center"></a>
								</div>							
								<h4>模拟练习</h4>
								<p>模拟练习规则</p>
								<p><a href="{:U('paper/paper_list')}" class="btn btn-danger">快速进入</a></p>
							</div>
						</div>
						<div class="col-md-3 col-sm-6">
							<div class="grey-box-icon">
								<div class="icon-box-top">
									<a href="{:U('stage/exercise_list')}"><img src="__TMPL__Public/front/img/tab1-2.png" alt="" class="fontawesome-icon medium circle-white center"></a>
								</div>
								<h4>闯关练习</h4>
								<p>闯关规则</p>
								<p><a href="{:U('stage/exercise_list')}" class="btn btn-danger">快速进入</a></p>
							</div>
						</div>
						<div class="col-md-3 col-sm-6">
							<div class="grey-box-icon">
								<div class="icon-box-top">
									<a href="{:U('user/err_list')}"><img src="__TMPL__Public/front/img/tab1-3.png" alt="" class="fontawesome-icon medium circle-white center"></a>
								</div>
								<h4>错题本</h4>
								<p>错题本</p>
								<p><a href="{:U('user/err_list')}" class="btn btn-danger">快速进入</a></p>
							</div>
						</div>
						<div class="col-md-3 col-sm-6">
							<div class="grey-box-icon">
								<div class="icon-box-top">
									<a href="{:U('user/err_list')}"><img src="__TMPL__Public/front/img/tab1-4.png" alt="" class="fontawesome-icon medium circle-white center"></a>
								</div>
								<!--icon box top -->
								<h4>我的考试</h4>
								<p>我的考试</p>
								<p><a href="{:U('paper/exam_his_list')}" class="btn btn-danger">快速进入</a></p>								
							</div>
						</div>
					</div>
				</div>				
			</div>
			<div class="row">
				<!-- 在线比武信息 -->
				<div class="col-md-6 pad-left">
					<div class="titleborder">
						<h2 class="tab-h2">在线比武 <small>Online contest</small></h2>
						<div class="carousel_nav">
							<a class="prev" id="car_prev" href="#"><span>prev</span></a>
							<a class="next" id="car_next" href="#"><span>next</span></a>
						</div>
					</div>					
					<div class="heightauto">
						<div class="list_carousel">
							<div class="clearfix">
							</div>
							<ul id="recent-projects">
								<php> $lists = sp_sql_posts_paged_bycatid(19,"where:smeta like '%portal%';order:post_hits DESC;",3); </php>
								<volist name="lists['posts']" id="vo">
								<li>
								<p>
									<php>$smeta=json_decode($vo['smeta'],true);</php>
									<notempty name="smeta.thumb">
									<img src="{:sp_get_image_preview_url($smeta['thumb'])}" class="imgproject" alt="">
									</notempty>
									<b>{$vo.post_title|mb_substr=0,10,utf8}</b> {$vo.post_excerpt|mb_substr=0,100,utf8}<a href="{:leuu('article/index',array('id'=>$vo['object_id'],'cid'=>$vo['term_id']))}">[...]</a>
								</p>
								<p>
									<a href="{:leuu('article/index',array('id'=>$vo['object_id'],'cid'=>$vo['term_id']))}" class="btn btn-danger"><i class="glyphicon glyphicon-star"></i> 查看详情</a>
								</p>
								</li>
								</volist>
								
							</ul>
						</div>
					</div>
					<div class="clearfix">
					</div>
				</div>
				<!-- 考试信息 -->
				<div class="col-md-6 pad-right">
					<div class="titleborder">
						<h2 class="tab-h2">考试信息 <small>Examination information </small></h2>
					</div>
					<div class="accordion">					
						<php>
							$lists = sp_sql_posts_paged_bycatid(20,null,4);
						</php>
						<volist name="lists['posts']" id="vo">
							<h3><span>{$vo.post_title}</span></h3>
							<div class="accord_cont">
								<div>
									<!-- <a href="{:leuu('article/index',array('id'=>$vo['object_id'],'cid'=>$vo['term_id']))}">{$vo.post_content|mb_substr=0,100,utf8}</a> -->
									<a href="{:leuu('article/index',array('id'=>$vo['object_id'],'cid'=>$vo['term_id']))}">{$vo.post_content}</a>
								</div>
							</div>						
						</volist>								
					</div>
				</div>
			</div>
			<!-- 排行榜 -->
			<div class="tab4">
				<div class="row"  style="border-bottom:1px solid #ddd;">
					<div class="col-md-12" >
						<h2 class="tab-h2">排行榜 <small>Ranking list</small></h2>
					</div>
				</div>
				<div class="row">
					<div class="col-md-4" style="padding:10px 10px 10px 0;">
						<div class="panel panel-success">
							<div class="panel-heading">
								<h3 class="panel-title">单位榜单</h3>
							</div>
							<div class="panel-body">
								<ul class="nav nav-pills">
									<li class="active"><a href="#zong1" data-toggle="tab">总榜单</a></li>
									<li><a href="#month1" data-toggle="tab">月度榜单</a></li>
									<li><a href="#year2" data-toggle="tab">年度榜单</a></li>
								</ul>
							</div>
							<div class="tab-content" style="height:270px;">
								<div id="zong1" class="tab-pane fade in active">
									<table class="table table-striped table-hover">
										<tr>
											<th>单位名称</th>
											<th>闯关人次</th>
											<th>参与人数</th>
											<th>排名</th>
										</tr>
										<tr>
											<td>炼铁分厂</td>
											<td>10000</td>
											<td>1000</td>
											<td>第一名</td>
										</tr>
										<tr>
											<td>一炼钢</td>
											<td>10200</td>
											<td>1050</td>
											<td>第二名</td>
										</tr>
										<tr>
											<td>二炼钢</td>
											<td>11000</td>
											<td>1500</td>
											<td>第三名</td>
										</tr>
										<tr>
											<td>一轧钢</td>
											<td>10000</td>
											<td>1000</td>
											<td>第四名</td>
										</tr>
										<tr>
											<td>二轧钢</td>
											<td>10000</td>
											<td>1000</td>
											<td>第五名</td>
										</tr>
										<tr>
											<td>动力分厂</td>
											<td>10000</td>
											<td>1000</td>
											<td>第六名</td>
										</tr>
									</table>
								</div>
								<div id="month1" class="tab-pane">
									2
								</div>
								<div id="year1" class="tab-pane">
									3
								</div>
							</div>
							<div class="panel-footer">
								<ul class="pager margin0">
									<li class="previous"><a href="#">上一页</a></li>
									<li class="next"><a href="#">下一页</a></li>
								</ul>
							</div>
						</div>
					</div>
					<div class="col-md-4" style="padding:10px;">
						<div class="panel panel-danger">
							<div class="panel-heading">
								<h3 class="panel-title">工种榜单</h3>
							</div>
							<div class="panel-body">
								<ul class="nav nav-pills">
									<li class="active"><a href="#zong2" data-toggle="tab">总榜单</a></li>
									<li><a href="#month2" data-toggle="tab">月度榜单</a></li>
									<li><a href="#year2" data-toggle="tab">年度榜单</a></li>
								</ul>
							</div>
							<div class="tab-content" style="height:270px;">
								<div id="zong2" class="tab-pane fade in active">
									<table class="table table-striped table-hover">
										<tr>
											<th>工种名称</th>
											<th>闯关人次</th>
											<th>参与人数</th>
											<th>排名</th>
										</tr>
										<tr>
											<td>电工</td>
											<td>10000</td>
											<td>1000</td>
											<td>第一名</td>
										</tr>
										<tr>
											<td>天车工</td>
											<td>10200</td>
											<td>1050</td>
											<td>第二名</td>
										</tr>
										<tr>
											<td>钳工</td>
											<td>11000</td>
											<td>1500</td>
											<td>第三名</td>
										</tr>
										<tr>
											<td>轧钢工</td>
											<td>10000</td>
											<td>1000</td>
											<td>第四名</td>
										</tr>
										<tr>
											<td>电焊工</td>
											<td>10000</td>
											<td>1000</td>
											<td>第五名</td>
										</tr>
										<tr>
											<td>高炉炼铁工</td>
											<td>10000</td>
											<td>1000</td>
											<td>第六名</td>
										</tr>
									</table>
								</div>
								<div id="month2" class="tab-pane">
									2
								</div>
								<div id="year2" class="tab-pane">
									3
								</div>
							</div>
							<div class="panel-footer text-right">
								<ul class="pager margin0">
									<li class="previous"><a href="#">上一页</a></li>
									<li class="next"><a href="#">下一页</a></li>
								</ul>
							</div>
						</div>
					</div>
					<div class="col-md-4" style="padding:10px 0px 10px 10px;">
						<div class="panel panel-info">
							<div class="panel-heading">
								<h3 class="panel-title">个人榜单</h3>
							</div>
							<div class="panel-body">
								<ul class="nav nav-pills">
									<li class="active"><a href="#zong3" data-toggle="tab">总榜单</a></li>
									<li><a href="#month3" data-toggle="tab">月度榜单</a></li>
									<li><a href="#year3" data-toggle="tab">年度榜单</a></li>
								</ul>
							</div>
							<div class="tab-content" style="height:270px;">
								<div id="zong3" class="tab-pane fade in active">
									<table class="table table-striped table-hover">
										<tr>
											<th>人员名称</th>
											<th>总积分</th>
											<th>等级</th>
											<th>排名</th>
										</tr>
										<tr>
											<td>张三</td>
											<td>10000</td>
											<td>高中三年级</td>
											<td>第一名</td>
										</tr>
										<tr>
											<td>李四</td>
											<td>10200</td>
											<td>高中二年级</td>
											<td>第二名</td>
										</tr>
										<tr>
											<td>王五</td>
											<td>11000</td>
											<td>初中二年级</td>
											<td>第三名</td>
										</tr>
										<tr>
											<td>马六</td>
											<td>10000</td>
											<td>硕士一年级</td>
											<td>第四名</td>
										</tr>
										<tr>
											<td>田七</td>
											<td>10000</td>
											<td>初中三年级</td>
											<td>第五名</td>
										</tr>
										<tr>
											<td>钱八</td>
											<td>10000</td>
											<td>小学六年级</td>
											<td>第六名</td>
										</tr>
									</table>
								</div>
								<div id="month3" class="tab-pane">
									2
								</div>
								<div id="year3" class="tab-pane">
									3
								</div>
							</div>							
							<div class="panel-footer text-right">
								<ul class="pager margin0">
									<li class="previous"><a href="#">上一页</a></li>
									<li class="next"><a href="#">下一页</a></li>
								</ul>
							</div>
						</div>
					</div>
				</div>				
			</div>
			<!-- 知识库 -->
			<div class="row">
				<div class="panel1">
					<div class="col-md-9">
						<h4 class="top0">知识库</h4>
						 <table class="table table-striped table-hover">
							<thead>
								<th>资料名称</th>
								<th>所属工种</th>
								<th>资料来源</th>
								<th>浏览次数</th>
							</thead>
							<tbody>
								<php>
									$lists = sp_sql_posts_paged_bycatid(1,null,5);
								</php>
								<volist name="lists['posts']" id="vo">
									<tr>
										<td><a href="{:leuu('article/index',array('id'=>$vo['object_id'],'cid'=>$vo['term_id']))}">{$vo.post_title}</a></td>
										<td>{:sp_get_term($vo['term_id'])['name']}</td>
										<td>{$vo.post_author}</td>
										<td>{$vo.post_hits}</td>
									</tr>
								</volist>
							</tbody>
						 </table>
					</div>
					<div class="col-md-3 text-center top10 pull-right">
						<!-- <a href="contact.html" class="btn btn-primary btn-lg">
						<i class="glyphicon glyphicon-download-alt"></i> Download Now </a> -->
						<php>
						$ad1_slides=sp_getslide("portal_index_ad1");</php>
						<notempty name="ad1_slides">
						<img src="{:sp_get_asset_upload_path($ad1_slides[0]['slide_pic'])}">
						<else/>
						<img src="__TMPL__Public/front/img/ad/advert1.png">
						</notempty>
					</div>
					<div class="clearfix">
					</div>
				</div>
			</div>
		</div>
		<!-- 通用底部-->
		<tc_include file="Public:front_foot"/>
	</div>
	<!-- 登录模态框 -->
	<div id="login_modal" class="modal fade" tabindex="-1">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"><span>&times;</span></button>
					<h4 class="modal-title">会员登录</h4>
				</div>
				<div class="modal-body">
					<div class="form-group">
						<label for="inputUser">输入用户名</label>
						<div class="input-group">
							<div class="input-group-addon"><i class="glyphicon glyphicon-user"></i></div>
							<input type="text" class="form-control" id="inputUser" placeholder="请输入用户名">
						</div>
					</div>
					<div class="form-group">
						<label for="inputPassword">密码</label>
						<div class="input-group">
							<div class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></div>
							<input type="password" class="form-control" id="inputPassword" placeholder="请输入密码">
						</div>
					</div>
					<div class="checkbox">
						<label class="checkbox">
							<input type="checkbox">记住我
						</label>
					</div>
				</div>
				<div class="modal-footer">
					<button class="btn btn-primary">登录</button>
					<button class="btn btn-default" data-dismiss="modal">关闭</button>
				</div>
			</div>
		</div>
	</div>
	<tc_include file="Public:scripts"/>
	<script src="__TMPL__Public/front/js/plugins.js"></script>
	<script src="__TMPL__Public/front/js/custom.js"></script>
	<!-- 调用在线比武js -->
	<script type="text/javascript">
		$(window).load(function(){			
			$('#recent-projects').carouFredSel({
				responsive: true,
				width: '100%',
				auto: true,
				circular	: true,
				infinite	: false,
				prev : {
					button		: "#car_prev",
					key			: "left",
						},
				next : {
					button		: "#car_next",
					key			: "right",
							},
				swipe: {
					onMouse: true,
					onTouch: true
					},
				scroll : 1500,
				items: {
					visible: {
						min: 1,
						max: 1
					}
				}
			});
		});	
	</script>
	<!-- 调用考试信息js -->
	<script type="text/javascript">
		$(".accordion h3").eq(0).addClass("active");
		$(".accordion .accord_cont").eq(0).show();
		$(".accordion h3").click(function(){
			$(this).next(".accord_cont").slideToggle("slow")
			.siblings(".accord_cont:visible").slideUp("slow");
			$(this).toggleClass("active");
			$(this).siblings("h3").removeClass("active");
		});	
	</script>

</body>
</html>
